package org.dfl.core.model.transitions;

import org.dfl.core.data.types.Type;
import org.dfl.core.data.types.TypeManager;
import org.dfl.core.model.TransitionExecutionException;
import org.dfl.messages.Messages;

/**
 * id transition
 * @author Piotr Wlodarczyk
 *
 */
public class IdTransition extends OneInputTransition {
	@Override
	protected Type getDefaultInputDefinition() {
		return TypeManager.getAnyType();
	}
	
	@Override
	protected Type getDefaultOutputDefinition() {
		return TypeManager.getAnyType();
	}
	
	@Override
	protected void connectInputAndOutput() {
		getOutputTypeContainer().connectWith(getInputContainer());
	}
	
	@Override
	protected Object fireSingle(Object input) throws TransitionExecutionException {
		return input;
	}
	
	@Override
	public String getDefaultDescription() {
		return Messages.IdTransition_description;
	}
}
